Skip to content

[#154] Fix link-status: detect agent NFT via balanceOf fallback#155

Merged
realproject7 merged 1 commit intomainfrom
fix/154-link-status-fallback
Apr 24, 2026
Merged

[#154] Fix link-status: detect agent NFT via balanceOf fallback#155
realproject7 merged 1 commit intomainfrom
fix/154-link-status-fallback

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Added balanceOf + tokenOfOwnerByIndex fallback to /api/settings/link-status endpoint. The existing agentIdByWallet check only works for bound wallets, but register() creates the NFT without calling setAgentWallet.

Test plan

  • npm run typecheck passes
  • npm run build passes
  • Settings page shows "Registered Agent #XXXX" after reload

Fixes #154

…back

agentIdByWallet only works for bound wallets. register() creates the NFT
but doesn't call setAgentWallet, so the binding lookup fails. Added
balanceOf + tokenOfOwnerByIndex fallback to detect owned agent NFTs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realproject7 realproject7 merged commit 9e0025b into main Apr 24, 2026
1 check passed
@realproject7 realproject7 deleted the fix/154-link-status-fallback branch April 24, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Agent registration detected but link-status shows unregistered

1 participant